# -*- encoding:utf-8 -*-
from django.contrib import admin
from models import MobliePage
from forms import MobileForm
# Register your models here.
class MobileAdmin(admin.ModelAdmin):
    form=MobileForm
    readonly_fields=['owner']
    list_display=['title']
    
    class Media:
        js=('ckeditor/ckeditor.js',)
        
    def save_model(self,request,obj,form,changed):
        obj.owner=request.user
        obj.save()
        
admin.site.register(MobliePage,MobileAdmin)